
/**
 ** \file       prompt.c
 **
 ** \brief      this function handle the prompt
 **
 ** \author     Ben M'rad Hanna, Laterem Hamza, Boillot Ulysse, De Olivera
 **             Guillaume and Nguyen Viet Dung
 **
 ** \version    1.0
 **
 ** \date       28 Novembre 2010
 **
 */

#include "prompt.h"

void            prompt(int      vers,
                       char     **argv)
{
  if (vers == 1)
  {
    write(STDOUT_FILENO, "(", 1);
    write(STDOUT_FILENO, basename(argv[0]), strlen(basename(argv[0])));
    write(STDOUT_FILENO, "$) ", 3);
  }
  else
    write(STDOUT_FILENO, ">", 1);
}
